草庐IT

firebase - flutter NoSuchMethodError

全部标签

javascript - 如何在 Firebase 中写入非规范化数据

我在StucturingData上阅读了Firebase文档.数据存储便宜,但用户的时间不便宜。我们应该针对get操作进行优化,并在多个地方写入。那么我可能会存储一个列表节点和列表索引节点,两者之间有一些重复的数据,至少是列表名称。我在我的javascript应用程序中使用ES6和promises来处理异步流,主要是在第一次数据推送后从firebase获取ref键。letaddIndexPromise=newPromise((resolve,reject)=>{letnewRef=ref.child('list-index').push(newItem);resolve(newRef.

javascript - 如何在 Firebase 3.0 中注销用户?

根据documentation,我强制用户使用signOut()方法注销。这是我试过的:varrootRef=firebase.database().ref();varloggedInUser=firebase.auth();1.firebase.signOut();2.loggedInUser.signOut();3.rootRef.signOut();4.signOut();5.firebase.auth.signOut();对于上述五个中的每一个,我得到...isnotafunction。我知道我对新Firebase的引用没有问题,因为firebase.database().re

javascript - 如何在 Firebase 3.0 中注销用户?

根据documentation,我强制用户使用signOut()方法注销。这是我试过的:varrootRef=firebase.database().ref();varloggedInUser=firebase.auth();1.firebase.signOut();2.loggedInUser.signOut();3.rootRef.signOut();4.signOut();5.firebase.auth.signOut();对于上述五个中的每一个,我得到...isnotafunction。我知道我对新Firebase的引用没有问题,因为firebase.database().re

javascript - 在 Firebase 中使用 push() 如何获取唯一 ID 并存储在我的数据库中

这个问题在这里已经有了答案:Whenutilizingthe.pushmethodcanIwriteacopyoftheidtotheobject?(2个答案)关闭4个月前。我在firebase中推送数据,但我也想在我的数据库中存储唯一ID。有人可以告诉我,如何推送具有唯一ID的数据。我正在尝试这样writeUserData(){varkey=ref.push().key();varnewData={id:key,websiteName:this.webname.value,username:this.username.value,password:this.password.valu

javascript - 在 Firebase 中使用 push() 如何获取唯一 ID 并存储在我的数据库中

这个问题在这里已经有了答案:Whenutilizingthe.pushmethodcanIwriteacopyoftheidtotheobject?(2个答案)关闭4个月前。我在firebase中推送数据,但我也想在我的数据库中存储唯一ID。有人可以告诉我,如何推送具有唯一ID的数据。我正在尝试这样writeUserData(){varkey=ref.push().key();varnewData={id:key,websiteName:this.webname.value,username:this.username.value,password:this.password.valu

javascript - 在 Firebase v3.0.1+ 中实现注销的最佳方式?更新后删除 Firebase.unauth

使用谷歌最近发布的新firebase3.0.1。之前,我们有Firebase.unauth()方法https://www.firebase.com/docs/web/api/firebase/unauth.html但它是旧API。我在新API中看不到任何相关内容:https://firebase.google.com/docs/reference/node/index-all您的解决方案是什么?尝试使用类似的东西:Object.keys(localStorage).forEach(key=>{if(key.indexOf('firebase')!==-1){localStorage.r

javascript - 在 Firebase v3.0.1+ 中实现注销的最佳方式?更新后删除 Firebase.unauth

使用谷歌最近发布的新firebase3.0.1。之前,我们有Firebase.unauth()方法https://www.firebase.com/docs/web/api/firebase/unauth.html但它是旧API。我在新API中看不到任何相关内容:https://firebase.google.com/docs/reference/node/index-all您的解决方案是什么?尝试使用类似的东西:Object.keys(localStorage).forEach(key=>{if(key.indexOf('firebase')!==-1){localStorage.r

javascript - 如何创建 Firebase web user.reauthenticateWithCredential() 方法所需的 "credential"对象?

newdocs中的(不清楚的)示例:varuser=firebase.auth().currentUser;varcredential;//Prompttheusertore-providetheirsign-incredentialsuser.reauthenticateWithCredential(credential).then(function(){我应该如何创建这个credential对象?我试过:reauthenticateWithCredential(email,password)(类似登录方式)reauthenticateWithCredential({email,pa

javascript - 如何创建 Firebase web user.reauthenticateWithCredential() 方法所需的 "credential"对象?

newdocs中的(不清楚的)示例:varuser=firebase.auth().currentUser;varcredential;//Prompttheusertore-providetheirsign-incredentialsuser.reauthenticateWithCredential(credential).then(function(){我应该如何创建这个credential对象?我试过:reauthenticateWithCredential(email,password)(类似登录方式)reauthenticateWithCredential({email,pa

javascript - Firebase 更新对比集

正如标题所说,我无法理解update和set之间的区别。此外,文档也帮不了我,因为如果我改用set,更新示例的工作方式完全相同。文档中的更新示例:functionwriteNewPost(uid,username,title,body){varpostData={author:username,uid:uid,body:body,title:title,starCount:0};varnewPostKey=firebase.database().ref().child('posts').push().key;varupdates={};updates['/posts/'+newPost